//引入安装的路由
import VueRouter from 'vue-router'
//引入自己创建的组件
import homeComponent from './components/tabbar/homeComponent.vue'
import memberComponent from './components/tabbar/memberComponent.vue'
import searchComponent from './components/tabbar/searchComponent.vue'
import shopcarComponent from './components/tabbar/shopcarComponent.vue'
import newLists from './components/news/newLists.vue'
import newsInfo from './components/news/newsInfo.vue'
var router = new VueRouter({
    routes: [ // 配置路由规则
      { path: '/', redirect: '/home' },
      { path: '/home', component: homeComponent },
      { path: '/member', component: memberComponent },
      { path: '/shopcar', component:shopcarComponent },
      { path: '/search', component: searchComponent},
      {path:'/home/newLists',component:newLists},
      {path:'/home/newsInfo/:id',component:newsInfo}
    ],
    linkActiveClass: 'mui-active' // 覆盖默认的路由高亮的类，默认的类叫做 router-link-active
  })
export default router